package com.ngc.mall.service.impl;

import com.ngc.mall.common.configure.LocalUser;
import com.ngc.mall.common.configure.mybatisPlus.BaseServiceImpl;
import com.ngc.mall.domain.MessageContentDomain;
import com.ngc.mall.mapper.MessageContentMapper;
import com.ngc.mall.service.IMessageContentService;
import com.ngc.mall.vo.MessageContentVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * 消息发送实现类
 * @author: chenxiaolin
 * @date 2023/11/8 14:59
**/
@Service
public class MessageContentServiceImpl extends BaseServiceImpl<MessageContentMapper, MessageContentDomain> implements IMessageContentService {

    @Override
    public Long createMessageContent(MessageContentDomain domain){
        Long uid= LocalUser.getLocalUser().getId();
        domain.setSendId(uid);
        return super.create(domain);
    }

    @Override
    public List<MessageContentVO> findAll() {
        return baseMapper.findAll();
    }


}
